package com.quiz.bis.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.quiz.bis.domain.model.ExamGroupMember;
import com.quiz.bis.domain.vo.ExamMemberVo;
import com.quiz.bis.domain.vo.ExamSubgroupMemberVo;
import com.quiz.bis.domain.vo.PendingMemberVo;
import com.quiz.common.mybatis.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 考试组成员Mapper接口
 * @author ahuan
 */
@Mapper
public interface ExamGroupMemberMapper extends BaseMapperPlus<ExamGroupMember> {
    Page<PendingMemberVo> selectPendingMembers(@Param("page") Page<Object> page,@Param("groupId") Long groupId);

    List<ExamSubgroupMemberVo> selectMemberDetails(List<Long> memberIds);

    List<Long> selectNonStudentMembers(@Param("groupId") Long groupId, @NotNull(message = "成员ID列表不能为空") @Param("userIds") List<Long> userIds);

    Page<ExamMemberVo> selectStuMembers(@Param("page") Page<Object> page,@Param("groupId") Long groupId,@Param("keyword") String keyword);

    List<Long> selectStuMemberList(@Param("groupId") Long groupId, @Param("examStudentIds") List<Long> examStudentIds);

}
